<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="jquery-latest.js"></script>
  <script src="TestPrefix.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test1-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test2-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test3-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test4-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test5-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test6-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test7-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test8-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test9-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test10-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test11-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test12-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test13-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test14-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test15-1.js"></script>
  <script src="./com/meyou/javascript/rewriter/Test16-1.js"></script>
  <link rel="stylesheet" href="qunit.css" type="text/css" media="screen" />
  <script type="text/javascript" src="qunit.js"></script>

  <script>
  $(document).ready(function(){
    
module("MeYou Rewriter");

asyncTest("test1", function() {
  var cons = RULES.types["test1-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 63, "expected 63");
     start();
  };
  obj.run([1, 2], [10, 20]);
});
  
asyncTest("test2", function() {
  var cons = RULES.types["test2-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 73, "expected 73");
     start();
  };
  obj.run(3, 7);
});

asyncTest("test3", function() {
  var cons = RULES.types["test3-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 45, "expected 45");
     start();
  };
  obj.run();
});

asyncTest("test4", function() {
  var cons = RULES.types["test4-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 4, "expected 4");
     start();
  };
  obj.run([0,1], [0,1]);
});

asyncTest("test5", function() {
  var cons = RULES.types["test5-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(1, [0,1]);
});

asyncTest("test6", function() {
  var cons = RULES.types["test6-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(1, [0,1]);
});

asyncTest("test7", function() {
  var cons = RULES.types["test7-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 3, "expected 3");
     start();
  };
  obj.run(1, [0,1]);
});

asyncTest("test8", function() {
  var cons = RULES.types["test8-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run([0,1], [0,1]);
});

asyncTest("test9", function() {
  var cons = RULES.types["test9-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(0, 0);
});

asyncTest("test10", function() {
  var cons = RULES.types["test10-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(0, 0);
});

asyncTest("test11", function() {
  var cons = RULES.types["test11-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(0, 0);
});

asyncTest("test12", function() {
  var cons = RULES.types["test12-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(1, 1);
});

asyncTest("test13", function() {
  var cons = RULES.types["test13-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(0, 0);
});

asyncTest("test14", function() {
  var cons = RULES.types["test14-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     ok(result == null, "expected null");
     start();
  };
  obj.run(1);
});

asyncTest("test15", function() {
  var cons = RULES.types["test15-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 4, "expected 4");
     start();
  };
  obj.run(0, 1);
});

asyncTest("test16", function() {
  var cons = RULES.types["test16-1"];
  var obj = new cons();
  obj.onComplete = function(result) {
     equals(result, 1, "expected 1");
     start();
  };
  obj.run(1);
});
  
});

  </script>
  
</head>
<body>
  <h1 id="qunit-header">QUnit Tests - MeYou</h1>
 <h2 id="qunit-banner"></h2>
 <h2 id="qunit-userAgent"></h2>
 <ol id="qunit-tests"></ol>
 <div id="qunit-fixture">test markup, will be hidden</div>
</body>
</html>